import { RouteRecordRaw } from "vue-router";
import LoginComponent from "@/pages/Login/index.vue"
import DashBoard from "@/pages/Dashboard/index.vue";
import Banner from "@/pages/Banner/index.vue";
import BlogLists from "@/pages/Blog/BlogLists/index.vue";
import AddBlog from "@/pages/Blog/AddBlog/index.vue";
import EditBlogCom from "@/pages/Blog/EditsBlog/index.vue";
import BlogTypes from "@/pages/Blog/BlogTypes/index.vue";
import ProjectList from "@/pages/Project/ProjectList/index.vue";
import AddProject from "@/pages/Project/AddProject/index.vue";
import CommentComp from "@/pages/Comment/index.vue";
import MessageComp from "@/pages/Message/index.vue";
import About from "@/pages/About/index.vue";
import SettingAbout from "@/pages/AboutSetting/index.vue";
import Personal from "@/pages/Personal/index.vue";
import NotFound from "@/pages/404.vue"
const routes: RouteRecordRaw[] = [
    {
        path: "/login",
        component: LoginComponent,
        name: "login",
        meta: {
            title: "个人后台登录"
        }
    },
    {
        path: "/dashboard",
        component: DashBoard,
        name: "dashboard",
        meta: {
            title: "首页",
            icon: "Help",
            auth: true
        }
    },
    {
        path: "/banner",
        component: Banner,
        name: "banner",
        meta: {
            title: "首页标语",
            icon: "HomeFilled",
            auth: true,
        }
    },
    {
        path: "/blog",
        component: BlogLists,
        name: "blog",
        meta: { title: '文章列表', icon: 'Tickets', auth: true, otherName: "文章管理" }
    },
    {
        path: "/blog/addblog",
        component: AddBlog,
        name: "addblog",
        meta: { title: '添加文章', icon: 'FolderAdd', auth: true }
    },
    {
        path: "/blog/editblog/:id",
        component: EditBlogCom,
        name: "editblog",
        meta: {
            title: '文章编辑',
            icon: 'el-icon-menu',
            auth: true,
            hidden: true,
        }
    },
    {
        path: "/blog/blogtypes",
        component: BlogTypes,
        name: "blogTypes",
        meta: { title: '文章分类', icon: 'Menu', auth: true }
    },
    {
        path: "/project",
        component: ProjectList,
        name: "project",
        meta: { title: '项目列表', icon: 'Folder', auth: true, otherName: "项目管理" }
    },
    {
        path: "/project/add",
        component: AddProject,
        name: "addproject",
        meta: { title: '添加项目', icon: 'CirclePlus', auth: true }
    },
    {
        path: "/comment",
        component: CommentComp,
        name: "comment",
        meta: {
            title: '评论管理',
            icon: 'ChatDotRound',
            auth: true
        },

    },
    {
        path: "/message",
        component: MessageComp,
        name: "message",
        meta: { title: '留言板管理', icon: 'CopyDocument', auth: true }
    },
    {
        path: "/about",
        component: About,
        name: "about",
        meta: { title: "关于我", icon: "UserFilled", auth: true }
    },
    {
        path: "/setting",
        component: SettingAbout,
        name: "setting",
        meta: {
            title: "设置", icon: "Tools", auth: true
        }
    },
    {
        path: "/personal",
        component: Personal,
        name: "personal",
        meta: {
            title: "个人中心",
            hidden: true,

        }
    },
    {
        path: "/",
        component: DashBoard,
        meta: {
            title: "首页"
        }
    },
    {
        path: '/:catchAll(.*)',
        component: NotFound,
        name: "NotFound",
        meta: {
            title: "404页面",
            icon: "HomeFilled",
            hidden: true
        }
    }
]

export default routes;